-
Notifications
You must be signed in to change notification settings - Fork 48
add withdraw #813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add withdraw #813
Conversation
🦋 Changeset detectedLatest commit: 5a3c8aa The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@jkbktl is attempting to deploy a commit to the Status Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements an emergency withdrawal feature for staking vaults, allowing users to withdraw funds when emergency mode is enabled on the staking contract.
Key changes:
- Added emergency mode detection and UI components (emergency bar, danger button variants)
- Implemented emergency exit functionality using
emergencyExitcontract method - Updated vault data to track actual token balance (
depositedBalance) for accurate display during emergency mode
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/status-network/tailwind.config.ts | Added danger color palette (50, 60 variants) for emergency UI elements |
| packages/status-network/src/components/button/index.tsx | Added size 24 button variant and moved text sizing from base to size-specific styles |
| packages/status-network/src/components/button-link/index.tsx | Added danger and grey variants, size 24 support, matching button component updates |
| apps/hub/src/app/stake/page.tsx | Conditionally hides total staked section when emergency mode is active |
| apps/hub/src/app/_hooks/useVaultEmergencyExit.ts | New hook implementing emergency withdrawal flow using vault's emergencyExit function |
| apps/hub/src/app/_hooks/useStakingVaults.ts | Added depositedBalance field fetched via token balanceOf for reliable emergency mode display |
| apps/hub/src/app/_constants/address.ts | Updated contract addresses for staking manager and vault factory |
| apps/hub/src/app/_components/vaults/vaults-table.tsx | Changed emergency mode polling from staleTime to refetchInterval |
| apps/hub/src/app/_components/vaults/table-columns.tsx | Updated staked column to show vault balance in emergency mode using depositedBalance |
| apps/hub/src/app/_components/vaults/modals/withdraw-vault-modal.tsx | Switched from useVaultWithdraw to useVaultEmergencyExit, added amountWei prop |
| apps/hub/src/app/_components/hub-layout.tsx | Added emergency mode detection and EmergencyBar component rendering |
| apps/hub/src/app/_components/emergency-bar.tsx | New component displaying emergency warning banner with withdraw action |
| .changeset/hungry-bananas-join.md | Changeset entry for withdraw feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(tested emergency withdrawal, all good 👍 )
* add withdraw * Add changeset for patch updates * address feedback * address feedback * change contracts address back to production * add use client to emergencyMode hook * test fix build * test fix build
how to test: